<?php
$url = '1756.htm';

$data = file_get_contents($url);
//get coord
//preg_replace($data,  "<br />", "&nbsp;");
preg_match('#(<table.*)(.*)<\/table>#', $data, $coord);

//echo "Aarde koordinaadid on ". $coord[1]."<br/>";

//echo "<pre>";
//print_r ($coord[1]);
preg_match('#s:\s<b>(.*)W{1}#', $coord[1], $coordddmmss);
$coordddmmss1 = strip_tags ($coordddmmss[1]);
echo "Aarde koordinaadid on dd mm ss ". $coordddmmss1."<br/>";
strip_tags ($coordddmmmm[1]);
preg_match('#mm:\s<b>(.*)dd\.#', $coord[1], $coordddmmmm);

echo "Aarde koordinaadid on dd mmmm ". $coordddmmmm[1]."<br/>";

preg_match('#dd:\s<b>(.*)L-#', $coord[1], $coorddddddd);

echo "Aarde koordinaadid on dd dddd ". $coorddddddd[1]."<br/>";

preg_match('#Est:\s<b>(.*)Ka#', $coord[1], $coordlest);

echo "Aarde koordinaadid on L-Est ". $coordlest[1]."<br/>";
?> 